<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>switch</title>
</head>
<body>
    <div style="margin-left: 400px">
        <h3> switch 使用</h3>
        <div th:switch="${sex}">
            <p th:case="f">性别是女</p>
            <p th:case="m">性别是男</p>
            <p th:case="*">未知</p>
        </div>
    </div>


</body>
</html>